package com.xgk.boot.module.core.dal.entity.order;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xgk.boot.framework.mybatis.core.dataobject.BaseDO;
import lombok.Data;

import java.util.Date;

/**
 * <p>
 * 订单导出记录
 * </p>
 *
 * @author yfbao
 * @since 2025-06-14
 */

@Data
@TableName("order_export")
public class OrderExportDO extends BaseDO {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 操作人ID
     */
    @TableField("user")
    private Long user;

    /**
     * 导出类型
     * 1:按单导出 2:按箱导出
     */
    @TableField("type")
    private Integer type;

    /**
     * 文件链接
     */
    @TableField("link")
    private String link;

    /**
     * 导出状态
     * 0:失败 1:正在导出 2:成功 3:数据为空
     */
    @TableField("status")
    private Integer status;

    /**
     * 错误信息
     */
    @TableField("error")
    private String error;

    /**
     * 导出开始时间
     */
    @TableField("start_time")
    private Date startTime;

    /**
     * 导出完成时间
     */
    @TableField("end_time")
    private Date endTime;

    /**
     * 任务名称
     */
    @TableField("name")
    private String name;


    @Override
    public String toString() {
        return "OrderExport{" +
        ", id = " + id +
        ", user = " + user +
        ", type = " + type +
        ", link = " + link +
        ", status = " + status +
        ", error = " + error +
        ", startTime = " + startTime +
        ", endTime = " + endTime +
        ", name = " + name +
        "}";
    }
}
